import React, {useEffect} from 'react'
import { useLocation } from "react-router-dom";

function History () {

	let a = useLocation();
	console.log('a',a)
	let id = a.state.id;
	console.log('id',id)


	//[]空数组相当于componentDidMount
	useEffect(() => {
		//禁止页面后退
			// window.history.pushState(null, null, window.location.href);
		 //  window.addEventListener('popstate', function () {
			// 					window.history.forward(-1);
		 //            window.history.pushState(null, null, window.location.href);
		 //        });


	    return () => {
	    }
	}, []);

    //渲染组件
        return (
				<div>
           历史记录页面
        </div>)
}

export default History;
